package cn.yshujia.constant;


import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @author YShuJia
 * @create 2024/4/23
 * @description 系统常量
 */

@Component
public class SystemConst implements Serializable {
	
	public static final String REMEMBER_KEY = "UTOPIA";
	
	public static final String AUTHOR = "YShuJia";
	
	// 自动识别json对象白名单配置（仅允许解析的包名，范围越小越安全）
	public static final String[] JSON_WHITELIST_STR = {"org.springframework", "cn.yshujia"};
	
	// Security 登录接口
	public static final String LOGIN = "/login";
	
	// Security 退出登录接口
	public static final String LOGIN_OUT = "/logout";
	
	// sm密钥存储 public key
	public static final String PUBLIC_KEY = "public";
	
	// sm密钥存储 private key
	public static final String PRIVATE_KEY = "private";
	
	// 限流key
	public static final String RATE_LIMIT_KEY = "rate_limit:";
	
	// 敏感数据替换符
	public static final String SENSITIVE_REPLACE = "[非礼勿言]";
	
	// 请求头携带 Token 请勿更改
	public static final String TOKEN_KEY = "Token";
	
	// 请求头携带 Token 前缀 请勿更改
	public static final String TOKEN_PREFIX = "Bearer ";
	
	// 请求头携带 前端公钥 Key 请勿更改
	public static final String AUTHORITY_KEY = "Authorization";
	
	// 权限连接符 请勿更改
	public static final String PERMISSION_CONNECT = ",";
	
}
